export const deepCopy = (data) => {
    let target;
    if (data instanceof Object) {
        target = Array.isArray(data) ? [] : {}
        for (let key in data) {
            if (data[key] instanceof Object) {
                target[key] = deepCopy(data[key])
            } else {
                target[key] = data[key]
            }
        }
    } else {
        target = data
    }
    return target
}
export const deepCopyWithJson = (data) => {
    return JSON.parse(JSON.stringify(data))
}
